package cn.txy.controller.manager;

import cn.txy.domain.OpenIdResult;
import cn.txy.result.JSONResult;
import cn.txy.service.IWechatRegisterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/wechat")
public class WechatRegisterController {
    @Autowired
    private IWechatRegisterService iWechatRegisterService;
    @GetMapping("/register/{code}")
    public JSONResult<OpenIdResult> getOpenId(@PathVariable("code") String code){

        return iWechatRegisterService.getOpenId(code);
    }
}
